package lab02.test05;

/**
 * Created by Administrator on 2017/10/15.
 */
public class Cube {

    double length;
    double width;
    double height;

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    //初始化长宽高
    public void initialize() {
        length = 0;
        width = 0;
        height = 0;
        System.out.println("初始化成功！\n长宽高的默认值均为0！！！");
    }

    //求立方体的体积
    public double volume() {

        return length * width * height;
    }
}

